<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>mini-keepalive</title>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/atom-one-dark.min.css">
  <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/highlight.min.js"></script>
  <style>
    body {
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
      margin: 0;
      padding: 20px;
    }
    h1 {
      text-align: center;
      margin-bottom: 30px;
    }
    #code-display {
      max-width: 800px;
      margin: 0 auto;
      background-color: #f5f5f5;
      border-radius: 8px;
      padding: 20px;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    pre {
      margin: 0;
      overflow-x: auto;
    }
    code {
      font-family: 'Courier New', Courier, monospace;
      font-size: 14px;
    }
  </style>
</head>
<body>
  <h1>mini-keepalive源码</h1>
  <div id="code-display">
    <pre><code class="language-typescript" id="code-content"></code></pre>
  </div>
  <script>
    // 获取code.js内容并高亮显示
    fetch('code.js')
      .then(response => response.text())
      .then(codeContent => {
        document.getElementById('code-content').textContent = codeContent;
        hljs.highlightAll();
      })
      .catch(error => {
        console.error('获取code.js失败:', error);
        document.getElementById('code-content').textContent = '无法加载代码';
      });
  </script>
</body>
</html> 